<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>목록</title>
</head>
<body>
<hr>
<b>목록</b><p/>
<table border="1" width="650" cellpadding="2" >
		<tr>
			<th width="10%">번호</th>
			<th width="50%">제목</th>
			<th width="15%">작성자</th>
			<th width="15%">작성일</th>
			<th width="10%">조회수</th>
			</tr>		
			<c:forEach var="bvo" items="${requestScope.list.list}">		
			<tr>
			    <td>${bvo.no }</td>
				<td><a href="${initParam.root}buyboard.do?command=showContentHits&no=${bvo.no }&hits=${bvo.hits }">		
				${bvo.title }</a></td>
				<td>${bvo.memberVO.id }</td>
				<td>${bvo.timePosted }</td>
				<td>${bvo.hits }</td>
			</tr>		
			</c:forEach>
	</table><br>
<p>
<a href="./view/buy/buy_write.jsp"><img alt="글쓰기"  border="0" src="${initParam.root}img/write_btn.jpg"></a>
<br><br>
<c:if test="${requestScope.list.pagingBean.previousPageGroup}">
<a href="${initParam.root}buyboard.do?command=getContentList&nowPage=${requestScope.list.pagingBean.startPageOfPageGroup-1}"><img src="img/left_arrow_btn.gif"></a>
</c:if>
<c:forEach var="page" begin="${requestScope.list.pagingBean.startPageOfPageGroup }" 
						 end="${requestScope.list.pagingBean.endPageOfPageGroup }">
	<a href="${initParam.root}buyboard.do?command=getContentList&nowPage=${page }">${page }</a>
</c:forEach>
<c:if test="${requestScope.list.pagingBean.nextPageGroup }">
<a href="${initParam.root}buyboard.do?command=getContentList&nowPage=${requestScope.list.pagingBean.endPageOfPageGroup+1}"><img src="img/right_arrow_btn.gif"></a>
</c:if>
</body>
</html>